package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.FpFaUserAddressDTO;
import com.financing.wap.dao.IFpFaUserAddressDao;
import com.financing.wap.common.SqlName;
/**
 * fp_fa_user_address  
 * 理财师-地址管理 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpFaUserAddressDao")
public class FpFaUserAddressDaoImpl extends BaseDaoImpl<FpFaUserAddressDTO, java.lang.Integer> implements IFpFaUserAddressDao {


	@Override
	public int insert(FpFaUserAddressDTO fpFaUserAddress) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.FpFaUserAddressSql.insert, fpFaUserAddress);
	}

	@Override
	public void update(FpFaUserAddressDTO fpFaUserAddress) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpFaUserAddressSql.update, fpFaUserAddress);
	}

	@Override
	public void updateForce(FpFaUserAddressDTO fpFaUserAddress) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpFaUserAddressSql.updateForce, fpFaUserAddress);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.FpFaUserAddressSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpFaUserAddressDTO> queryList(FpFaUserAddressDTO fpFaUserAddress) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.FpFaUserAddressSql.queryList, fpFaUserAddress);
	}

	@Override
	public int queryListCount(FpFaUserAddressDTO fpFaUserAddress) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.FpFaUserAddressSql.queryListCount, fpFaUserAddress);
	}

	@Override
	public FpFaUserAddressDTO loadById(Integer id) throws SQLException {
		return  (FpFaUserAddressDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.FpFaUserAddressSql.loadById,id);
	}

	@Override
	public Class<FpFaUserAddressDTO> getEntityClass() {
		return FpFaUserAddressDTO.class;
	}
 	
}
